import http from './http'
let root=''
if (process.env.NODE_ENV === 'production') {
	root = '/app/index.php/'
	console.log("root", root)
}else{
	root = '/app'
	console.log("root", root)
}

// 合同
//export const pdfUrl = root + '/m/install/contract/'
// 审核员列表获取接口
// export const getAssistUserInfo = (params) => {
//   return http.fetchGet(api.getAssistUserInfo, params)
// }https://www.umiyun.net/addons/youmi_activitys/public/
// https://wx.longyue8.com/app/index.php?i=4&c=entry&do=index&m=umi_brainhole&op=JPXX
//?i=4&c=entry&do=index&m=umi_brainhole&op=system
export default {
	async system(params){
		return await http.fetchPost(root + "?i=4&c=entry&do=index&m=umi_brainhole&op=system", params)
	},
	async getAwardInfo(params){
		return await http.fetchPost(root + "?i=4&c=entry&do=index&m=umi_brainhole&op=JPXX", params)
	},
	async getPassInfo(params){
		return await http.fetchPost(root + "?i=4&c=entry&do=index&m=umi_brainhole&op=CXBM", params)
	},
	async hexiao(params){
		return await http.fetchPost(root + "?i=4&c=entry&do=index&m=umi_brainhole&op=HXSJ", params)
	},
	async saveInfo(params){
		return await http.fetchPost(root + "?i=4&c=entry&do=index&m=umi_brainhole&op=reg", params)
	},
	async configItemShare(params){
		return await http.fetchPost(root + "?s=App.Config.ItemShare", params)
	},
	async configItemShare(params){
		return await http.fetchPost(root + "?s=App.Config.ItemShare", params)
	},
	async configJssdk(params){
		return await http.fetchPost(root + "?i=4&c=entry&do=index&m=umi_brainhole&op=sdk", params)
	},
	async BalancePage(params){
		return await http.fetchPost(root + "?s=App.Balance.Page", params)
	},
	async withdrawalPage(params){
		return await http.fetchPost(root + "?s=App.Withdrawal.Page", params)
	},
	async withdrawalSave(params){
		return await http.fetchPost(root + "?s=App.Withdrawal.Save", params)
	},
	async verificationItem(params){
		return await http.fetchPost(root + "?s=App.Verification.Item", params)
	},
	async getOrderPage(params){
		return await http.fetchPost(root + "?s=App.Order.Page", params)
	},
	async getMealPage(params){
		return await http.fetchPost(root + "?s=App.Meal.Page", params)
	},
	async getBillSave(params){
		return await http.fetchPost(root + "?s=App.Bill.Save", params)
	},
	async getMerchantItems(params){
		return await http.fetchPost(root + "?s=App.Merchant.Items", params)
	},
	async getVerificationPage(params){
		return await http.fetchPost(root + "?s=App.Verification.Page", params)
	},
	async getVerificationSave(params){
		return await http.fetchPost(root + "?s=App.Verification.Save", params)
	},
	async getActivityFans(params){
		return await http.fetchPost(root + "?s=App.Activity.Count", params)
	},
	async getFansItem(params){
		return await http.fetchPost(root + "?s=App.Fans.Item", params)
	},
	async getUserInfo(params){
		return await http.fetchPost(root + "?s=App.Weixin.YongHu", params)
	},
	async getOpenid(params){
		return await http.fetchPost(root + "?s=App.Weixin.Weixin", params)
	},
	async getWeixinConfig(params){
		return await http.fetchPost(root + "?s=App.Config.ItemWeixin", params)
	},
	async activityDel(params){
		return await http.fetchPost(root + "?s=App.Activity.Del", params)
	},
	async activitySave(params){
		return await http.fetchPost(root + "?s=App.Activity.Save", params)
	},
	async getActivityItem(params){
		return await http.fetchPost(root + "?s=App.Activity.Item", params)
	},
	async getActivityPage(params){
		return await http.fetchPost(root + "?s=App.Activity.Page", params)
	},
	async getSlidepicPage(params){
		return await http.fetchPost(root + "?s=App.Slidepic.Page", params)
	},
	async getArticle(params){
		return await http.fetchPost(root + "?s=App.Article.Item", params)
	},
	async getMerchantItem(params){
		return await http.fetchPost(root + "?s=App.Merchant.Item", params)
	},
	async getMerchantPage(params){
		return await http.fetchPost(root + "?s=App.Merchant.Page", params)
	},
	async saveMerchant(params){
		return await http.fetchPost(root + "?s=App.Merchant.Save", params)
	},
	async updateCase(params){
		return await http.fetchPost(root + "?s=App.Cases.Save", params)
	},
	async getCaseById(params){
		return await http.fetchPost(root + "?s=App.Cases.Item", params)
	},
	async getCaseType(params){
		return await http.fetchGet(root + "?s=App.Casetype.Page", params)
	},
	async getCaseList(params){
		return await http.fetchPost(root + "?s=App.Cases.Page", params)
	},
    async getArticleList(params){
		return await http.fetchGet(root + "?s=App.Article.Page", params)
	},
    async getTabbar(params){
		return await http.fetchGet(root + "?s=App.Config.Items", params)
	},
	uploadPic(params){
		return http.fetchPostForUpload(root + "?s=App.Examples_Upload.Go", params)
	}
}